<head>
<script>
var frame;
function print(message)
{
    var line = document.createElement("div");
    line.appendChild(document.createTextNode(message));
    document.body.appendChild(line);
}
function handleDOMContentLoadedEvent()
{
    document.body.removeChild(document.body.firstChild);
    print("A) Entered DOMContentLoaded event handler function.");
    frame = document.createElement("iframe");
    document.body.appendChild(frame);
    print("B) Exiting DOMContentLoaded event handler function.");
    if (window.testRunner)
        testRunner.notifyDone();
}
function handleLoadEvent()
{
    print("C) Entered load event handler function.");
    document.body.removeChild(frame);
    print("D) Exiting load event handler function.");
    print("Test passed if messages A, B, C, D were all in order and there was no crash.");
}
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}
addEventListener("load", handleLoadEvent);
addEventListener("DOMContentLoaded", handleDOMContentLoadedEvent);
</script>
</head>
<body>TEST DID NOT RUN YET</body>
